/*
 *  author: lichuang
 *  2010-09-27
 */

#include "common/array.h"
#include "common/common.h"
#include "insert_sort.h"

int main(int argc, char *argv[]) {
  int size;
  if (argc > 1) {
    size = atoi(argv[1]);
  } else {
    size = DEFAULT_ARRAY_SIZE;
  }
  array_t *array;
  array = array_create(size);
  array_init(array);
  array_print(array, "before sort:");
  insert_sort(array);
  ASSERT(array_check_sorted(array));
  array_print(array, "after sort:");

  array_destroy(array);
  return 0;
}
